//
//  SSUserManager.h
//  wordSmartStore
//
//  Created by xieShou on 2020/4/29.
//  Copyright © 2020 xieShou. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SSUserInfoModel.h"
#import "XLNetWorkManager.h"
#import "SSNetAPI.h"


NS_ASSUME_NONNULL_BEGIN

@interface SSUserManager : NSObject
+ (instancetype)sharedUser;
@property (nonatomic,strong) SSUserInfoModel *userModel;
@property (nonatomic,assign) BOOL isLoginSuccess;
@property (nonatomic,assign) NSInteger memberLevel;

@property (nonatomic,assign) NSInteger cloudRootNodeID;
- (void)getUserInfo;
- (void)getUserInfoSuccess:(void (^)(id _Nonnull data))success;

- (void)getRootCloudNodeSuccess:(void (^)(id _Nonnull))success;

- (BOOL)isLogin;
- (void)checkMobile:(NSString *)mobile
            success:(void(^)(id data))success
               fail:(void(^)(id data))fail;

//type 短信类型(1 信息变更验证码 2 修改密码验证码 3 用户注册验证码 4 登录异常验证码 5 登录确认验证码 6 身份验证验证码) 目前只用到了2 3 5
- (void)sendSmsCode:(NSString *)mobile
            type:(NSInteger)type
            success:(void(^)(id data))success
            fail:(void(^)(id data))fail;
- (void)toLoginSuccess:(void(^)(id data))success;

- (void)loginOut:(void(^)(id data))success;
@end

NS_ASSUME_NONNULL_END
